To date, the state-of-the-art methods for improving the definition of text graphics, including Microsoft ClearType® technology, increase the potential display resolution of text on a color matrix digital display device by using conventional sub-pixel rendering techniques. The improvement of the on-screen reading experience resulting from the sub-pixel rendering methods has enabled the emergence of new product categories, such as electronic books (e-books). The improved rendering techniques have also benefited the display of existing spreadsheets, word processing documents, and Internet content, which display text using fonts which have been rendered for color matrix displays.
There are several types of sub-pixel rendering techniques in use today. One type is known as “anti-aliasing.” Anti-aliasing was developed to make blocky letters easier for the human eye to resolve. Another text-rendering technique uses Microsoft's ClearType® technology. The ClearType® technology uses a filtering technique to enhance the resolution and readability of text rendered on displays that contain a repeating pattern of addressable colored sub-pixels. These two techniques are described in further detail below.
A single pixel of a typical digital color matrix display device, such as a liquid crystal device (LCD) display or a plasma display panel (PDP) display is composed of three in-line “sub-pixels”: one red, one green, and one blue (RGB). The sub-pixel triad forms a single pixel. The linear array of color sub-pixels translates to a horizontal resolution of three times the maximum horizontal resolution that could be achieved for the display. Therefore, addressing the actual sub-pixels individually and ignoring their different colors can provide as much as three times the horizontal resolution from the existing digital matrix display panels than if single pixel addressing were used. Sub-pixel rendering works because human eyes perceive changes in luminance with greater resolution than changes in color.
When a white line is presented on a color matrix display, what is really being displayed is a line of sub-pixel triads of red, green, and blue. The human eye does not perceive these closely spaced colors individually because the vision system does not see color changes at high resolution. Accordingly, the human eye mixes the three primary colors in combination to form intermediates. However, the eye can register the three primary colors when single sub-pixels of the primary color signals are exclusively illuminated in a multi-pixel area. All other combinations of the primary color signals are perceived as intermediate (secondary and tertiary) color signals. The combination of all three color signals in the proper intensity is perceived as white, and the absence of all color signals is perceived as black.
A conventional method for controlling the sub-pixels is through rendering. Rendering can map pixels of a font/letter onto sub-pixels in a particular sequence in order to achieve optimum resolution for the font. For example, FIG. 1 shows a 12-point regular (non-italics, non-bold) “S” rendered using full-pixel rendering techniques. FIG. 2 illustrates what the capital “S” looks like at the sub-pixel level when the pixels shown in FIG. 1 are shifted one-third of a pixel to the right. The result is a blocky letter which may be difficult for the human eye to resolve.
The technique known as “anti-aliasing” was developed to make blocky letters easier to resolve. Using this technique, FIG. 3 illustrates the capital “S” of FIG. 2, where partially filled pixels are each rendered with a prescribed gray level. In particular, a one-third-filled pixel is assigned a light gray, and a two-thirds-filled pixel is assigned a dark gray. The human eye will tend to average gray pixels with the adjacent pixels. FIG. 4 illustrates the anti-aliased letter rendered for a color matrix display, with red-green-blue sequenced sub-pixels elements (color not shown). In this image, the coloration of the sub-pixels of the letter corresponds to the horizontal position of the visual energy.
The Microsoft ClearType® technology improves on the anti-aliasing technique described above. Actual pixels of an LCD are tall rectangles of red, green and blue, and hardware associated with LCD can generally address the individual components of a pixel separately. Therefore, if software treats RGB as a single unit, an image of all red pixels will be offset one-third pixel to the left of an image of all green pixels, and an image of all blue pixels will be offset one-third pixel to the right. In order to draw a font using the ClearType® technology, the font is first drawn three times as wide as normal, while using anti-aliasing to smooth sloped edges. Then, a low-pass filter is applied to the font to avoid color fringing. The process for controlling color fringing takes into account the background color the font is going to be drawn on. The ClearType® Microsoft technology uses a three-tap finite impulse response (FIR) filter. Using this filter, the RGB components of the font are sampled alternately to produce a final image at nearly triple the apparent horizontal resolution of an ordinarily anti-aliased font. Further information regarding Microsoft's ClearType® can be found in Betrisey, C., Blinn, J. F., Dresevic, B., Hill, B., Hitchcock, G., Keely, B., Mitchell, D. P., Platt, J. C., Whitted, T., “Displaced Filtering for Patterned Displays,” Proc. Society for Information Display Symposium, pp. 296-299 (2000). The entire contents of the article are hereby incorporated herein by reference.
Both the anti-aliasing and ClearType technologies are generally used in conjunction with TrueType fonts. TrueType fonts were developed by Apple, and the technology includes the use of a rasterizer along with the actual TrueType font itself. The rasterizer is a piece of software that is embedded in an operating system. The rasterizer gathers information on the size, color, orientation, and location of all the TrueType fonts displayed in the operating system, and converts that information into a bitmap that can be understood by a graphics card and a display device. Thus, the rasterizer is essentially an interpreter that understands mathematical data supplied by a given font, and translates the data into a form that is capable of being rendered by a display device.
The actual fonts themselves contain data that describes the outline of each character in the typeface. The fonts may also include data that corresponds to hinting codes. Hinting is a process that makes a font that has been scaled down to a small size look its best. Instead of simply relying on a vector outline, the hinting codes ensure that the characters line up well with the pixels of the display device so that the font looks as smooth and legible as possible. The process of improving the resolution of any given font, including a TrueType font, may also include the use of anti-aliasing or the use of ClearType® technology.
Recently, many applications that are used in conjunction with graphical user interfaces use a technology referred to as alpha blending to create the effect of transparency. This is useful when creating graphical effects that include combining a semi-translucent foreground with a background color to create an in-between blend. For example, in a graphical user interface (GUI), it may be desirable to superimpose a semi-translucent window over a window having a solid background. In this case, the information in both the semi-translucent window and the background window would be apparent to a user of the GUI.
In the foregoing, the use of the colors red, green, and blue have been discussed in conjunction with displaying fonts on the display device. However, in the case of bitmaps, alpha values may be used in order to combine at least two distinct bitmaps in order to create a blended composite image. Therefore, in addition to the RGB components that represent an object's hue (its color), an additional A, or alpha, component is used to represent the bitmap's opacity (its capacity to obstruct the transmission of light). The technique of using an A component in conjunction with RGB is often referred to ARGB. When A equals 1, the object obstructs all light from shining through it; when A equals 0.25, that is an opacity of 25 percent, then 75 percent of light striking the object passes through it. Therefore, when A equals 0, total transparency is achieved.
Blending in ARGB mode allows source and destination pixel values to be combined in various ways. The blend of the source and destination pixels is a linear combination of their ARGB components. That is, source blending the factors (βA,βR,βG,βB) and destination blending factors (γA,γR,γG,γB) are defined as multipliers of the source and destination colors (AS, RS, GS, BS) and (AD, RD, GD, BD), and these weighted colors are added to get the blended ARGB value.
Therefore, when blending two separate bitmaps to create one composite bitmap for display in a GUI, first the foreground bitmap is rendered and stored in memory, and then the background bitmap is rendered and stored in memory. These two bitmaps are then blended together, pixel by pixel, to create a composite image that is displayed on the GUI.
Unfortunately, it is difficult to render TrueType fonts on ARGB bitmaps. In particular, when ARGB bitmaps include a combination of a translucent or semi-translucent foreground with a background having a given color, where it is desirable to use the TrueType font on the foreground. The computation required to display a TrueType font on a foreground necessitates taking into consideration the color of the background. This is because rendering TrueType fonts, without significant color fringing, requires certain information about the properties of the background the fonts are rendered on. However, until a foreground ARGB is combined with a background ARGB, the actual background is simply unknown. And even if the background were known, then the computation required to render the TrueType font would require a potentially large amount of computational time. It would be better if this computational burden could be used by an operating system, implementing a GUI, for other purposes.